package cn.cs.client;
import cn.cs.fallback.CsImageClientFallBack;
import cn.cs.pojo.CsImage;

import java.util.List;
import java.util.Map;

import cn.cs.config.CsConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* Created by yuexl
*/
@FeignClient(name = "cs-base-provider", configuration = CsConfiguration.class, fallback = CsImageClientFallBack.class)
public interface RestCsImageClient {

    @RequestMapping(value = "/getCsImageById",method = RequestMethod.POST)
    public CsImage getCsImageById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getCsImageListByMap",method = RequestMethod.POST)
    public List<CsImage>	getCsImageListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getCsImageCountByMap",method = RequestMethod.POST)
    public Integer getCsImageCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/qdtxAddCsImage",method = RequestMethod.POST)
    public Integer qdtxAddCsImage(@RequestBody CsImage csImage)throws Exception;

    @RequestMapping(value = "/qdtxModifyCsImage",method = RequestMethod.POST)
    public Integer qdtxModifyCsImage(@RequestBody CsImage csImage)throws Exception;

    @RequestMapping(value = "/queryCsImageList",method = RequestMethod.POST)
    public List<CsImage> queryCsImageList(@RequestParam("targetId") Long targetId,
                                          @RequestParam(value = "type", required = false) Integer type,
                                          @RequestParam(value = "category", required = false) Integer category);
}
